<?php
$roles=array(
    '1'=>'学生',
    '3'=>'老师',
    '4'=>'内审'
);
$submit=array(
	'name'=>'submit',
	'class'=>'submit',
	'type'=>'submit',
	'value'=>'查询',
);
$delete = array(
    'name'=>'delete',
    'class' => 'submit',
    'value' => 'Delete'

);
//班级列表
$classid_options=array();
$classid_options['']='请选择';
foreach($classid as $i) {
    $classid_options[$i->id]=$i->name;
}
?>
<head>
    <?php $this->load->view('load_view'); ?>
</head>
<div class="col-wrap handin-wrap">
    <!--start col-->
    <div class="col handin">
        <div class="wrap-title">
            <p class="page-title">
                用户管理
            </p>
        </div>

        <p class="desc">
    	介绍：添加用户，或班级，对用户进行管理
        </p>
        <div class="itemtitle">
            <h3>操作类型</h3>
            <?php $this->load->view('admin/useroptions'); ?>
            <div class="clear"></div>
        </div>
        <div class="search">
            <?php
                echo form_open($this->uri->uri_string());
                echo form_label('选择班级');
                echo form_dropdown('classid',$classid_options);
                echo form_input($submit);
                echo form_close();
                //echo $delete_message;
            ?>
        </div>
            <?php
            if(!$search){
            $tmpl = array (
                'table_open'          => '<table class="sortTable" id="sortTable" cellspacing="1">',
                'heading_row_start'   => '<thead><tr>',
                'heading_row_end'     => '</tr></thead>',
                'heading_cell_start'  => '<th class="header"><p>',
                'heading_cell_end'    => '</p></th>',
                'table_close'         => '</table>'
            );

            $this->table->set_template($tmpl);
            $this->table->set_heading('是否删除','姓名','Email','最后登录时间','编辑用户');
            echo form_open($this->uri->uri_string());
            echo $this->table->generate();
            ?>
            <p class="control">
                <a id="selectAll" href="javascript:">全选</a>
                <a id="selectNone" href="javascript:">不选</a>
                <?php

                    echo form_submit($delete);
                    echo form_close();
                 ?>
            </p>
            <?php }else{ ?>
            <p class="desc">选择班级进行查询...</p>
            <?php } ?>
    </div>
    <!--end col-->
</div>
<!--end col-wrap-->
<script>
    $('ul.selectNav li#manageclass').addClass('current');
    $(window.parent.document).find("ul.nav li a").removeClass("then");
    $(window.parent.document).find("a#usermanage").attr("class","then");
</script>

